<?php

namespace  Admin\Common\Controller;
use Common\Common\CommonController;


/**
 * Class BaseController
 * @package Admin\Common\Controller
 * 后台公共控制器
 */
class BaseController  extends  CommonController
{
     public function add($model,$data){
       $res=$model->edit($data);
         $this->jump($res);
     }
    private function jump($res){
        if($res['valid']){
            $this->success($res['msg']);die;
        }else{
            $this->error($res['msg']);die;
        }
    }
}